#coding=utf-8
import parameters as pms
import gym
import dqn
import storage
import numpy as np
import os,sys
import logging
if __name__=='__main__':
    logger = logging.getLogger()
    logger.setLevel(logging.INFO)
    env=gym.make(pms.gamename)
    outdir = '/home/drl/Destop'
    # env.monitor.start(outdir, force=True, seed=0)
    agent=dqn.DQNAgent(env)
    update_step=0

    for episodeNumber in range(pms.episodeCount):
        state=env.reset()
        done=False
        successStep=0
        ###采集其中一个场景的数据
        while(done==False):
            env.render()
            actionNum=agent.act(state,0) #get action
            state,reward,done,info=env.step(actionNum)
        # env.monitor.close()
